package day12;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

/**
 * @author oldliu
 * @since 1.0
 */
public class NimingThread {
    public static void main(String[] args) {

        Thread t=new Thread("王凯宣。斯基"){
            @Override
            public void run() {
                 for(int i=1;i<=20;i++){
                     System.out.println(super.getName()+" 打印了 "+i);
                 }
            }
        };

        t.start();

        Thread t2=new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=20;i<=50;i++){
                    System.out.println(Thread.currentThread().getName()+" 打印了 "+i);
                }
            }
        });
        t2.start();

        new Thread("线程3"){
            @Override
            public void run() {
                for(int i=20;i<=50;i++){
                    System.out.println(getName()+" 打印了 "+i);
                }
            }
        }.start();

        List list=new List(){

            @Override
            public int size() {
                return 0;
            }

            @Override
            public boolean isEmpty() {
                return false;
            }

            @Override
            public boolean contains(Object o) {
                return false;
            }

            @Override
            public Iterator iterator() {
                return null;
            }

            @Override
            public Object[] toArray() {
                return new Object[0];
            }

            @Override
            public boolean add(Object o) {
                return false;
            }

            @Override
            public boolean remove(Object o) {
                return false;
            }

            @Override
            public boolean addAll(Collection c) {
                return false;
            }

            @Override
            public boolean addAll(int index, Collection c) {
                return false;
            }

            @Override
            public void clear() {

            }

            @Override
            public Object get(int index) {
                return null;
            }

            @Override
            public Object set(int index, Object element) {
                return null;
            }

            @Override
            public void add(int index, Object element) {

            }

            @Override
            public Object remove(int index) {
                return null;
            }

            @Override
            public int indexOf(Object o) {
                return 0;
            }

            @Override
            public int lastIndexOf(Object o) {
                return 0;
            }

            @Override
            public ListIterator listIterator() {
                return null;
            }

            @Override
            public ListIterator listIterator(int index) {
                return null;
            }

            @Override
            public List subList(int fromIndex, int toIndex) {
                return null;
            }

            @Override
            public boolean retainAll(Collection c) {
                return false;
            }

            @Override
            public boolean removeAll(Collection c) {
                return false;
            }

            @Override
            public boolean containsAll(Collection c) {
                return false;
            }

            @Override
            public Object[] toArray(Object[] a) {
                return new Object[0];
            }
        };

//        class T extends  Thread{
//            @Override
//            public void run() {
//
//            }
//        }

    }
}
